package com.xucy.springboot.designmodel.behavioral.iterator;

/**
 * @Author xucy
 * @Date 2019-07-30 10:29
 * @Description
 **/

public abstract class CourseItr {

    CourseList courseList;
    int position;

    public CourseItr(CourseList courseList) {
        this.courseList=courseList;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    /**
     * 遍历课程
     *
     * @Author xucy
     * @Date 10:29 2019-07-30
     * @param
     * @return
     */
    abstract Course itrCourse();


    /**
     * 判断是否是最后一个课程
     *
     * @Author xucy
     * @Date 10:30 2019-07-30
     * @param
     * @return
     */
    abstract boolean isLastCourse();
}
